<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>style样式</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
	<div id="box" style="border: 10px solid green">vicky</div>
	<div id="div1">
		<p><b>Hello</b> world!</p>
		<ul>
			<li>List item 1</li>
			<li>List item 2</li>
			<li>List item 3</li>
		</ul>
	</div>
	<script type="text/javascript" src="../Code/commonFunc.js"></script>
	<script type="text/javascript">
	var box = document.getElementsByTagName("div")[0];
	// var computedStyle = document.defaultView.getComputedStyle(box,null);
	// console.log(computedStyle.width);
	var width = getCSS(box,"width");
	console.log(width);
	var div = document.getElementById("div1");
	var filter = function (node) {
		return node.tagName.toLowerCase() == "li" ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
	}
	var iterator = document.createNodeIterator(div,NodeFilter.SHOW_ELEMENT,filter,false);
	var node = iterator.nextNode();

	while (node != null) {
		alert(node.tagName);
		node = iterator.nextNode();
	}
	</script>

</body>
</html>